public class Zuoye7 {
    String child;
    String younger;
    String old;
    int age;
    int price;
    int a=30,b=50,c=80;
    int num;
    public void Zuoye7(){
        if(age<=14&&age>=0)
        {
            price=num*a;
        }
        else if(age<=50&&age>14)
        {
            price=num*b;
        }
        else if(age>50&&age<=150)
        {
            price=num*c;
        }
        else
            System.out.println("输入错误。");
        System.out.println("总价格是："+price+"元。");
    }
}
